<script  id="tmpl_calendar_week" type="text/x-jquery-tmpl" style="display:none;">
<table>
	<tbody>
		<tr>
			{{each days}}
			{{if ($value.today == 1) }}
			<td class="today" id="jsmark-date-${m_date}-${m_month}>
			{{else}}
			<td class="" id="jsmark-date-${m_date}-${m_month}">
			{{/if}}
				<div class="date"><span>${$value.m_date}</span></div>
				<div class="menu-balloon-container">
					<div class="balloon" style="left:-120px; top:13px; display: none;">
						<div class="balloon-wrapper box-skin">
							<form action="/ajax_milestone/add_milestone" method="get" class="add-milestone">
							<div class="balloon-pointer">
			                     <div class="balloon-arrow"></div>
			                     <div class="balloon-arrow-border"></div>
	   	                	</div>
							<div class="balloon-content">
								<div class="part">
									<label>Title :</label>
									<input type="text" name="name" value="">
								</div>	
								<div class="part">
									<label>Deadline :</label>
									<input type="text" class="deadline" name="deadline" value="${m_full_year}-{{html convert_two_digit(m_month)}}-{{html convert_two_digit(m_date)}}"> at 
									<input type="text" class="time" name="time" value="">
								</div>
								<div class="part">
									<label>Owner :</label>
									<select name="owner_id">
										<option>Select owner</option>
										{{each users}}
											<option value="${$value.id}">${$value.displayname}</option>
										{{/each}}	
									</select>
								</div>
								<div class="part">
									<label>Description :</label>
									<textarea name="description"></textarea>
								</div>
								<div class="part final">
									<button class="cancel left">Cancel</button>
									<button class="save left">Save</button>	
								</div>
								<input type="hidden" name="cur_user_id" value="${cur_user_id}">
								<input type="hidden" name="project_id" value="">			
							</div>
							</form>
						</div>
					</div>
				</div>
				{{each elements}}
				<div class="element">
						<input type="checkbox" onClick="
						check_milestone(event, this, ${cur_user_id})" value="${$value.id}" name=""> 
						<a href="#" onClick="get_edit_milestone(event, this, ${$value.id}, ${cur_user_id});">${$value.name}</a>
				</div>
				{{/each}}
			</td>
			{{/each}}
		</tr>
	</tbody>
</table>
</script>

<script  id="tmpl_calendar_week_full" type="text/x-jquery-tmpl" style="display:none;">
<table>
	<tbody>
		<tr>
			{{each days}}
			{{if ($value.today == 1) }}
			<td class="today" id="jsmark-date-${m_date}-${m_month}>
			{{else}}
			<td class="" id="jsmark-date-${m_date}-${m_month}">
			{{/if}}
				<div class="date"><span>${$value.m_date}</span></div>
				<div class="menu-balloon-container">
					<div class="balloon" style="left:-120px; top:13px; display: none;">
						<div class="balloon-wrapper box-skin">
							<form action="/ajax_milestone/add_milestone" method="get" class="add-milestone">
							<div class="balloon-pointer">
			                     <div class="balloon-arrow"></div>
			                     <div class="balloon-arrow-border"></div>
	   	                	</div>
							<div class="balloon-content">
								<div class="part">
									<label>Title :</label>
									<input type="text" name="name" value="">
								</div>	
								<div class="part">
									<label>Project :</label>
									<select name="project_id" value="">
										<option>asdb</option>
									</select>
								</div>
								<div class="part">
									<label>Deadline :</label>
									<input type="text" class="deadline" name="deadline" value="${m_full_year}-{{html convert_two_digit(m_month)}}-{{html convert_two_digit(m_date)}}"> at 
									<input type="text" class="time" name="time" value="">
								</div>
								<div class="part">
									<label>Owner :</label>
									<input type="text" name="res_user_id" value="">
								</div>
								<div class="part final">
									<button class="cancel left">Cancel</button>
									<button class="save left">Save</button>	
								</div>
								<input type="hidden" name="cur_user_id" value="${cur_user_id}">		
							</div>
							</form>
						</div>
					</div>
				</div>
				{{each elements}}
				<div class="element">
						<input type="checkbox" onClick="
						check_milestone(event, this, ${cur_user_id})" value="${$value.id}" name=""> 
						<a href="#" onClick="get_edit_milestone(event, this, ${$value.id}, ${cur_user_id});">${$value.name}</a>
				</div>
				{{/each}}
			</td>
			{{/each}}
		</tr>
	</tbody>
</table>
</script>
<script  id="tmpl_calendar_element" type="text/x-jquery-tmpl" style="display:none;">
<div class="element">
	<input type="checkbox" onClick="check_milestone(event, this, ${cur_user_id})" value="${id}" name=""> 
	<a href="#" onClick="get_edit_milestone(event, this, ${id}, ${cur_user_id});">
		${name}
	</a>
</div>
</script>